#include "MapPage.h"
#include "AppRouter.h"
#include "PageMgr.h"

REGISTER_PAGE("Pages/Map", MapPage)

void MapPage::OnViewLoad() {
	m_view.Create(m_body);
	AddEvent(m_view.m_img);
}

void MapPage::OnScrSlideRight() {
	GoTo("Pages/Main", anim_type_em::LOAD_ANIM_MOVE_RIGHT);
}
void MapPage::OnScrSlideLeft() {
	GoTo("Pages/HeartRate", anim_type_em::LOAD_ANIM_MOVE_LEFT);
}
void MapPage::OnEvent(lv_event_code_t code, lv_obj_t* obj) {
	if (code == LV_EVENT_CLICKED && obj == m_view.m_img) {
		LV_LOG_USER("---img clicked----");
	}
}